<template>
  <div class="setting-data-cmp-box">
    <div class="font-16 font-w-500 mar-b-20">商城橱窗</div>
    <div class="text-con">
      请前往”查看商品已选项目“配置，最多允许设置4个橱窗商品
      <el-button class="mar-t-24" type="primary" @click="goToShops">去配置</el-button>
    </div>
  </div>
</template>
<script>
import _ from "lodash";
import { PageRoutesTypeEnum } from 'pub-bbx-global/pageType/dist/enum/PageRoutesEnum'
import { openAccurateTab } from '@src/util/platform'
import { getRootWindow } from '@src/util/dom';

export default {
  name: "shops-list-data",
  data() {
    return {};
  },
  computed: {
    // 是否开启商城灰度
    isOpenServiceMall() {
      const RootWindow = getRootWindow(window);
      return RootWindow?.grayAuth?.SERVICE_MALL ?? false;
    }
  },
  methods: {
    goToShops() {
      // this.$platform.openTab({
      //   id: 'PORTAL_MALL', 
      //   title: '商城管理', 
      //   url: '/setting/serviceStation/partShop'
      // });
      const type = this.isOpenServiceMall
        ? PageRoutesTypeEnum.PageLinkcGoodsList
        : PageRoutesTypeEnum.PagePartShopSetting;
      openAccurateTab({ type });
    },
  },
};
</script>
<style lang="scss" scoped>
.setting-data-cmp-box {
  width: 100%;
  padding: 16px;
  background: #fff;
  .text-con {
    margin-top: 124px;
    padding: 0 45px;
    color: #666;
    text-align: center;
  }
}
</style>
